<!DOCTYPE html>
<html>
<head>
    <meta charset=utf-8 />
    <title>TestWebView2</title>
</head>
<body>
    </br></br></br></br></br>
    <button type="button" onclick="postMsg()">给WPF宿主程序发送msg</button>
    <script>
        window.onload = function () {
            alert("界面加载完成");
        }
		//
        function postMsg() {
            var user = {"name":"zs"};
            window.chrome.webview.postMessage(user);
        }
		 function WpfMsg(a) {         
            alert("C#调用JS：" + a);
        }
    </script>
</body>
</html>



